package io.terminus;

import io.terminus.manager.FlagManager;

import java.util.Scanner;

/**
 * Created by Stay on 2017/6/23  19:44.
 */
public class Main {

    public static void main(String[] args) {
        System.out.println("请输入三个数字(用逗号分隔):");
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String[] strs = str.split(",");
        if (strs.length > 3) {
            throw new RuntimeException("输入长度大于3");
        }
        Integer[] spNums = new Integer[strs.length];
        //接收的字符串封装成数组
        for (int i = 0; i < strs.length; i++) {
            spNums[i] = Integer.parseInt(strs[i]);
        }
        //开始接收特殊数字数组
        FlagManager flagManager = FlagManager.getInstance().reveiveArray(spNums);
        String outStr = null;
        for (int j = 1; j <= 100; j++) {
            outStr = flagManager.reveiveNum(j).judgeNum().build();
            System.out.println(outStr);
        }

    }


}
